<!-- 必须全局拥有唯一的id -->
<div id="roleDatapower">
  <yu-panel :title="$t('roleDataPowerManager.sjsq')">
    <el-row :gutter="24">
      <!--对象部分-->
      <el-col :span="15">
        <yu-xform v-model="formdata" related-table-name="roletable" form-type="search" label-width="120px">
          <yu-xform-group :column="4">
            <yu-xform-item :label="$t('roleDataPowerManager.jsssjg')" :placeholder="$t('roleDataPowerManager.jsssjg')" ctype="yufp-org-tree"
              name="orgId"></yu-xform-item>
            <yu-xform-item :label="$t('roleDataPowerManager.jsdmmc')" :placeholder="$t('roleDataPowerManager.jsdmmc')" ctype="input"
              name="roleInfo"></yu-xform-item>
          </yu-xform-group>
        </yu-xform>
        <yu-toolBar>
          <el-button @click="exportInfoFn" v-if="uploadButton">{{ $t('roleDataPowerManager.dc') }}</el-button>
          <el-button @click="copyInfoFn" v-if="copyButton">{{ $t('roleDataPowerManager.fz') }}</el-button>
        </yu-toolBar>
        <el-table-x ref="roleTable" @row-click="selectRowRole" :radiobox="true" :checkbox="roleGrid.checkbox" :height="roleGrid.height"
          :data-url="roleGrid.dataUrl" :base-params="roleGrid.dataParams" :table-columns="roleGrid.tableColumns">
        </el-table-x>
      </el-col>
      <!--资源部分-->
      <el-col :span="9">
        <!--菜单和控制点资源-->
        <el-row :gutter="10">
          <el-col :span="10">
            <yu-toolBar>
              <el-button @click="selectAllFn" :disabled="ifTreeButton">{{ $t('roleDataPowerManager.qx') }}</el-button>
              <el-button @click="reSetFn" :disabled="ifTreeButton">{{ $t('roleDataPowerManager.zz') }}</el-button>
            </yu-toolBar>
          </el-col>
          <el-col :span="14">
            <el-input :placeholder="$t('roleDataPowerManager.srgjz')" v-model="filterText" style="margin-top: 5px;margin-left: -24px;"></el-input>
          </el-col>
        </el-row>

        <yufp-ext-tree ref="menuTree" :show-checkbox="menuTree.treeCheckBox" :height="menuTree.height" :data-url="reourceUrl" data-id="id"
          data-label="menuName" v-loading="menuTree.loading" element-loading-:text="$t('roleDataPowerManager.pmjzz')" node-key="id"
          :check-strictly="false" :filter-node-method="filterNode" data-pid="upMenuId" data-root="0" :render-content="renderContent"
          @check-change="handleClick" :expand-level="1" accordion></yufp-ext-tree>
      </el-col>
    </el-row>
    <!--{{ $t('roleDataPowerManager.bc') }}按钮-->
    <div align="center" style="margin-top: 20px;">
      <el-button type="primary" @click="saveAllInfoFn" center>{{ $t('roleDataPowerManager.bc') }}</el-button>
    </div>
  </yu-panel>
  <!-- {{ $t('roleDataPowerManager.fz') }} -->
  <el-dialog-x :center="true" :title="$t('roleDataPowerManager.ztdxxz')" :visible.sync="dialogVisible">
    <el-table-x ref="roleTable1" :radiobox="true" :default-load="false" :base-params="roleGrid.dataParams" :data-url="roleGrid.dataUrl"
      :table-columns="roleGrid.tableColumns">
    </el-table-x>
    <div slot="footer" class="dialog-footer" align="center">
      <el-button type="primary" @click="copyCheck">{{ $t('roleDataPowerManager.qd') }}</el-button>
      <el-button @click="dialogVisible=false">{{ $t('roleDataPowerManager.qx') }}</el-button>
    </div>
  </el-dialog-x>
  </div>